/**
*  Author: Magnus Hemmer Pihl
*  Student number: 5452
*
*  Assignment 2
*  16/9-2007
**/

#include "List.h"
#include <iostream>
#include <cstdlib>

using namespace std;

void main()
{
    List *a = new List();
    a->push(1);
    a->push(2);
    a->push(3);

    List *b = new List();
    (*b)[0] = 4;
    b->push(5);
    b->push((*a)[0]+7);

    *b += *a;
    List *c = new List();
    *c = *a+*b;

    cout << "A: " << *a << endl;
    cout << "B: " << *b << endl;
    cout << "C: " << *c << endl;
    cout << "A & C: " << *a << *c << endl;
    if(*a == *b)    cout << "A equals B!\n";
    else            cout << "A does not equal B.\n";
    if(*b != *c)    cout << "B does not equal C.\n";
    else            cout << "B equals C!\n";
    if(*c == *c)    cout << "C equals C!\n";
    else            cout << "Something's really wrong...\n";
    system("PAUSE");
}